﻿@model CSF.Customers.Data.Customer
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using (Html.BeginForm())
{  
      <div id="container">
        <div id="formStyle">
            <fieldset>
                <legend></legend>
                @Html.ValidationSummary(true)
                <p>
                    <label>
                        Code</label>
                    @Html.TextBoxFor(model => model.Code)
                    @Html.ValidationMessageFor(model => model.Code)
                </p>
                <p>
                    <label>
                        Full Name</label>
                    @Html.TextBoxFor(model => model.FullName)
                    @Html.ValidationMessageFor(model => model.FullName)
                </p>
                <p>
                    <label>
                        Nick Name</label>
                    @Html.TextBoxFor(model => model.NickName)
                    @Html.ValidationMessageFor(model => model.NickName)
                </p>
                <p>
                    <label>
                        Address1</label>
                    @Html.TextAreaFor(model => model.Address1, new { @style = "width:200px;" })
                    @Html.ValidationMessageFor(model => model.Address1)
                </p>
                 <p>
                    <label>
                        Address2</label>
                    @Html.TextAreaFor(model => model.Address2, new { @style = "width:200px;" })
                    @Html.ValidationMessageFor(model => model.Address2)
                </p>
                <p>
                    <label>
                        Suburb</label>
                    @Html.TextBoxFor(model => model.Suburb)
                    @Html.ValidationMessageFor(model => model.Suburb)
                </p>
                <p>
                    <label>
                        State, Province or County</label>
                    @Html.TextBoxFor(model => model.Province)
                    @Html.ValidationMessageFor(model => model.Province)
                </p>
                <p>
                    <label>
                        Zip (or post) Code</label>
                    @Html.TextBoxFor(model => model.ZipCode)
                    @Html.ValidationMessageFor(model => model.ZipCode)
                </p>
               
                <p>
                    @Html.ActionLink("Back to List", "Index")
                </p>
            </fieldset>
            <fieldset>
                <legend></legend>
                 <p>
                    <label>
                        Country</label>
                    @Html.DropDownListFor(m => m.CountryCode, ViewData["Country"] as IEnumerable<SelectListItem>, "--please select--", new { @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.CountryCode)
                </p>
                <p>
                    <label>
                        Region</label>
                    @Html.DropDownListFor(m => m.RegionCode, ViewData["Region"] as IEnumerable<SelectListItem>, "--please select--", new { @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.RegionCode)
                </p>
                <p>
                    <label>
                        Customer Type</label>
                    @Html.DropDownListFor(m => m.CustomerTypeId, ViewData["CustomerType"] as IEnumerable<SelectListItem>, "--please select--", new { @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.CustomerTypeId)
                </p>
                <p>
                    <label>
                        Credit Class</label>
                    @Html.DropDownListFor(m => m.CreditClassCode, ViewData["CreditClass"] as IEnumerable<SelectListItem>, "--please select--", new { @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.CreditClassCode)
                </p>
                <p>
                    <label>
                        Phone</label>
                    @Html.TextBoxFor(model => model.Phone)
                    @Html.ValidationMessageFor(model => model.Phone)
                </p>
                <p>
                    <label>
                        Fax</label>
                    @Html.TextBoxFor(model => model.Fax)
                    @Html.ValidationMessageFor(model => model.Fax)
                </p>
                <p>
                    <label>
                        Email</label>
                    @Html.TextBoxFor(model => model.Email)
                    @Html.ValidationMessageFor(model => model.Email)
                </p>
                <p>
                    <label>
                        In the mailing list</label>
                    @Html.CheckBoxFor(model => model.InMailList)
                    @Html.ValidationMessageFor(model => model.InMailList)
                </p>
                <p>
                    <label>
                        Fedex Account No</label>
                    @Html.TextBoxFor(model => model.CourierAccountNo)
                    @Html.ValidationMessageFor(model => model.CourierAccountNo)
                </p>
                <p>
                    <label>
                        EIN or VAT No</label>
                    @Html.TextBoxFor(model => model.VatNo)
                    @Html.ValidationMessageFor(model => model.VatNo)
                </p>
                <p>
                    <label>
                        Web Site</label>
                    @Html.TextBoxFor(model => model.WebSite)
                    @Html.ValidationMessageFor(model => model.WebSite)
                </p>
            </fieldset>
            <p class="submit">
                <button type="submit">
                    Create</button></p>
        </div>
    </div>
}